<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>偏门问题 | 学习笔记</title><meta name="author" content="lzoxun"><meta name="copyright" content="lzoxun"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta name="description" content="vue v-ifv-if element控件 如果切换的内容相似错乱问题    el-form ref&#x3D;”childform” key&#x3D;”xx” 常见的兼容性问题项目的难点- web调用摄像头，web播放rtsp视频流问题  终端图标字体无法显示问题 方案 1 下载 下载喜欢的字体然后右键选择为所有用户安装后更改 PowerShell 窗口的字体即可    js 浮点数计算偏差">
<meta property="og:type" content="article">
<meta property="og:title" content="偏门问题">
<meta property="og:url" content="http://example.com/2023/07/22/other/other-issues/index.html">
<meta property="og:site_name" content="学习笔记">
<meta property="og:description" content="vue v-ifv-if element控件 如果切换的内容相似错乱问题    el-form ref&#x3D;”childform” key&#x3D;”xx” 常见的兼容性问题项目的难点- web调用摄像头，web播放rtsp视频流问题  终端图标字体无法显示问题 方案 1 下载 下载喜欢的字体然后右键选择为所有用户安装后更改 PowerShell 窗口的字体即可    js 浮点数计算偏差">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png">
<meta property="article:published_time" content="2023-07-22T07:14:09.684Z">
<meta property="article:modified_time" content="2023-07-22T07:14:09.684Z">
<meta property="article:author" content="lzoxun">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="http://example.com/2023/07/22/other/other-issues/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/',
  algolia: undefined,
  localSearch: {"path":"/search.xml","preload":true,"top_n_per_article":1,"unescape":true,"languages":{"hits_empty":"找不到您查询的内容：${query}","hits_stats":"共找到 ${hits} 篇文章"}},
  translate: {"defaultEncoding":2,"translateDelay":0,"msgToTraditionalChinese":"繁","msgToSimplifiedChinese":"簡"},
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: {"chs_to_cht":"你已切换为繁体","cht_to_chs":"你已切换为简体","day_to_night":"你已切换为深色模式","night_to_day":"你已切换为浅色模式","bgLight":"#49b1f5","bgDark":"#1f1f1f","position":"bottom-left"},
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '偏门问题',
  isPost: true,
  isHome: false,
  isHighlightShrink: false,
  isToc: true,
  postUpdate: '2023-07-22 15:14:09'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          const now = new Date()
          const hour = now.getHours()
          const isNight = hour <= 6 || hour >= 18
          if (t === undefined) isNight ? activateDarkMode() : activateLightMode()
          else if (t === 'light') activateLightMode()
          else activateDarkMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><meta name="generator" content="Hexo 6.3.0"></head><body><div id="loading-box"><div class="loading-left-bg"></div><div class="loading-right-bg"></div><div class="spinner-box"><div class="configure-border-1"><div class="configure-core"></div></div><div class="configure-border-2"><div class="configure-core"></div></div><div class="loading-word">加载中...</div></div></div><script>(()=>{
  const $loadingBox = document.getElementById('loading-box')
  const $body = document.body
  const preloader = {
    endLoading: () => {
      $body.style.overflow = ''
      $loadingBox.classList.add('loaded')
    },
    initLoading: () => {
      $body.style.overflow = 'hidden'
      $loadingBox.classList.remove('loaded')
    }
  }

  preloader.initLoading()
  window.addEventListener('load',() => { preloader.endLoading() })

  if (false) {
    document.addEventListener('pjax:send', () => { preloader.initLoading() })
    document.addEventListener('pjax:complete', () => { preloader.endLoading() })
  }
})()</script><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src= "" data-lazy-src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">108</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div></div></div></div><div class="post" id="body-wrap"><header class="post-bg" id="page-header"><nav id="nav"><span id="blog-info"><a href="/" title="学习笔记"><span class="site-name">学习笔记</span></a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search" href="javascript:void(0);"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 归档</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="post-info"><h1 class="post-title">偏门问题</h1><div id="post-meta"><div class="meta-firstline"><span class="post-meta-date"><i class="far fa-calendar-alt fa-fw post-meta-icon"></i><span class="post-meta-label">发表于</span><time class="post-meta-date-created" datetime="2023-07-22T07:14:09.684Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time><span class="post-meta-separator">|</span><i class="fas fa-history fa-fw post-meta-icon"></i><span class="post-meta-label">更新于</span><time class="post-meta-date-updated" datetime="2023-07-22T07:14:09.684Z" title="更新于 2023-07-22 15:14:09">2023-07-22</time></span></div><div class="meta-secondline"><span class="post-meta-separator">|</span><span class="post-meta-pv-cv" id="" data-flag-title="偏门问题"><i class="far fa-eye fa-fw post-meta-icon"></i><span class="post-meta-label">阅读量:</span><span id="busuanzi_value_page_pv"><i class="fa-solid fa-spinner fa-spin"></i></span></span></div></div></div></header><main class="layout" id="content-inner"><div id="post"><article class="post-content" id="article-container"><h3 id="vue-v-if"><a href="#vue-v-if" class="headerlink" title="vue v-if"></a>vue v-if</h3><p>v-if element控件 如果切换的内容相似错乱问题<br>    el-form ref&#x3D;”childform” key&#x3D;”xx”</p>
<h3 id="常见的兼容性问题"><a href="#常见的兼容性问题" class="headerlink" title="常见的兼容性问题"></a>常见的兼容性问题</h3><h3 id="项目的难点"><a href="#项目的难点" class="headerlink" title="项目的难点"></a>项目的难点</h3><pre><code>- web调用摄像头，web播放rtsp视频流问题
</code></pre>
<h3 id="终端图标字体无法显示问题"><a href="#终端图标字体无法显示问题" class="headerlink" title="终端图标字体无法显示问题"></a>终端图标字体无法显示问题</h3><ul>
<li><a target="_blank" rel="noopener" href="https://www.nerdfonts.com/">方案 1</a><ul>
<li><a target="_blank" rel="noopener" href="https://www.nerdfonts.com/font-downloads">下载</a></li>
<li>下载喜欢的字体然后右键选择<code>为所有用户安装</code>后更改 PowerShell 窗口的字体即可</li>
</ul>
</li>
</ul>
<h3 id="js-浮点数计算偏差问题"><a href="#js-浮点数计算偏差问题" class="headerlink" title="js 浮点数计算偏差问题"></a>js 浮点数计算偏差问题</h3><blockquote>
<p>两位小数: 同时乘以 100 变成整数,结果再根据运算符相对的减少倍数<br>四位小数: 同时乘以 10000 变成整数……</p>
</blockquote>
<h3 id="语法糖"><a href="#语法糖" class="headerlink" title="语法糖"></a>语法糖</h3><blockquote>
<p>指计算机语言中添加的某种语法，这种语法对语言的功能并没有影响，但是更方便程序员使用。通常来说使用语法糖能够增加程序的可读性(如 ts，scss)</p>
</blockquote>
<h3 id="github-io-无法访问的问题"><a href="#github-io-无法访问的问题" class="headerlink" title="github.io 无法访问的问题"></a>github.io 无法访问的问题</h3><ul>
<li>修改 dns 为 114.114.114.114</li>
<li>dns污染问题<ul>
<li><a target="_blank" rel="noopener" href="https://www.ipaddress.com/">https://www.ipaddress.com/</a></li>
<li>搜索<a target="_blank" rel="noopener" href="https://github.com/">https://github.com</a> 拿到最新github IP地址</li>
<li>搜索<a target="_blank" rel="noopener" href="https://codeload.github.com/">https://codeload.github.com</a></li>
<li>搜索<a target="_blank" rel="noopener" href="https://assets-cdn.github.com/">https://assets-cdn.github.com</a></li>
<li>搜索<a target="_blank" rel="noopener" href="https://global.ssl.fastly.net/">https://global.ssl.fastly.net</a></li>
</ul>
</li>
</ul>
<h3 id="将网页创建桌面快捷方式"><a href="#将网页创建桌面快捷方式" class="headerlink" title="将网页创建桌面快捷方式"></a>将网页创建桌面快捷方式</h3><blockquote>
<p>chrome:&#x2F;&#x2F;apps&#x2F; -&gt; 拖动收藏的网址到页面中 -&gt; 图标上右键创建快捷方式</p>
</blockquote>
<h3 id="json"><a href="#json" class="headerlink" title="json"></a>json</h3><blockquote>
<p>json是一种格式<br>json字符串：json格式的字符串<br>json对象：json格式的对象(键值对必须是双引号)</p>
</blockquote>
<h3 id="移动端-click-延迟处理"><a href="#移动端-click-延迟处理" class="headerlink" title="移动端 click 延迟处理"></a>移动端 click 延迟处理</h3><blockquote>
<p>移动端 200-300ms 延迟可以使用 <code>fastclick</code>插件或将 click 事件替换<code>tab事件</code>来解决<br> tap 事件不是原生的，zepto、微信小程序等都有封装</p>
</blockquote>
<h3 id="遍历对象"><a href="#遍历对象" class="headerlink" title="遍历对象"></a>遍历对象</h3><ul>
<li>js便利对象无法保证顺序<blockquote>
<p>这是因为在遍历对象时，key为整数类型或者可以转换为整数类型的字符串（例如：“0”）时，会将这些key从小到大优先进行遍历，然后其它的key会按照创建的实际顺序进行遍历。<br>json数据是无序的,数组是有序的<br>将已有json通过<code>new Map(Object.entries(json))</code>转Map,或通过<code>Object.keys(json)</code>获取key，顺序都是打乱的</p>
</blockquote>
</li>
<li>排序问题与es版本有关，老版本好像没有这样的问题<ul>
<li><a target="_blank" rel="noopener" href="https://www.ecma-international.org/publications-and-standards/standards/ecma-262/">ECMA-262（ECMAScript）</a>,第三版,for-in 语句的属性遍历的顺序是由对象定义时属性的书写顺序决定的。</li>
<li>ECMA-262（ECMAScript）第五版,对 for-in 语句的遍历机制又做了调整，属性遍历的顺序是没有被规定的。</li>
</ul>
</li>
</ul>
<h3 id="STAR-法则"><a href="#STAR-法则" class="headerlink" title="STAR 法则"></a>STAR 法则</h3><ul>
<li>S: situation(项目背景)</li>
<li>T: task(任务目标)</li>
<li>A: action(采取的行动)</li>
<li>R: result(产生的结果)</li>
</ul>
<h3 id="robots-txt"><a href="#robots-txt" class="headerlink" title="robots.txt"></a>robots.txt</h3><blockquote>
<p>当一个搜索蜘蛛访问一个站点时，它会首先检查该站点根目录下是否存在robots.txt，如果存在，搜索机器人就会按照该文件中的内容来确定访问的范围；如果该文件不存在，所有的搜索蜘蛛将能够访问网站上所有没有被口令保护的页面。</p>
</blockquote>
<h3 id="vue-快捷到了代码段"><a href="#vue-快捷到了代码段" class="headerlink" title="vue 快捷到了代码段"></a>vue 快捷到了代码段</h3><blockquote>
<p>vscode -&gt; 首选项 -&gt; 用户片段 -&gt; 搜索 vue</p>
</blockquote>
<p>设置</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="punctuation">&#123;</span></span><br><span class="line">    <span class="attr">&quot;Print to console&quot;</span><span class="punctuation">:</span> <span class="punctuation">&#123;</span></span><br><span class="line">        <span class="attr">&quot;prefix&quot;</span><span class="punctuation">:</span> <span class="string">&quot;temp&quot;</span><span class="punctuation">,</span></span><br><span class="line">        <span class="attr">&quot;body&quot;</span><span class="punctuation">:</span> <span class="punctuation">[</span></span><br><span class="line">            <span class="string">&quot;&lt;template&gt;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;&lt;div class=&#x27;warp&#x27;&gt;&lt;/div&gt;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;&lt;/template&gt;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;&lt;script&gt;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;import * as API from &#x27;@/api&#x27;;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;export default &#123;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;data()&#123;return &#123;&#125;&#125;,create()&#123;&#125;,methods:&#123;getData() &#123;let that = this;API.AxiosPOST(&#x27;&#x27;, &#123;&#125;).then((res) =&gt; &#123;&#125;);&#125;,&#125;,mounted()&#123;this.getData()&#125;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;&#125;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;&lt;/script&gt;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;&lt;style lang=&#x27;scss&#x27; scoped&gt;&quot;</span><span class="punctuation">,</span></span><br><span class="line">            <span class="string">&quot;&lt;/style&gt;&quot;</span></span><br><span class="line">        <span class="punctuation">]</span><span class="punctuation">,</span></span><br><span class="line">        <span class="attr">&quot;description&quot;</span><span class="punctuation">:</span> <span class="string">&quot;Log output to console&quot;</span></span><br><span class="line">    <span class="punctuation">&#125;</span></span><br><span class="line"><span class="punctuation">&#125;</span></span><br></pre></td></tr></table></figure>

<p>新文件中直接输入 demo,回车</p>
<h3 id="hook"><a href="#hook" class="headerlink" title="hook"></a>hook</h3><ul>
<li>在不使用 class 的情况下，管理里面的状态数据，并且把里面逻辑思维的东西抽取出来，封装在一个可复用的功能函数中</li>
<li>类似 vue2.x 中的 mixin 混入(有时很多个组件都有相同的方法或 created(){}做相同事情时，定义一个 mixin，后期合并到需要的组件中中)</li>
</ul>
<h3 id="无法安装-node-sass"><a href="#无法安装-node-sass" class="headerlink" title="无法安装 node-sass"></a>无法安装 node-sass</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">node-sass 升级到最新版</span><br></pre></td></tr></table></figure>
<h3 id="vmin-和-vm"><a href="#vmin-和-vm" class="headerlink" title="vmin 和 vm"></a>vmin 和 vm</h3><blockquote>
<p>  把相对于viewport的宽度或高度中较小的那个分100份</p>
</blockquote>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">font-size: 12px;	/*IE6-8*/</span><br><span class="line">font-size: 5vm;		/*IE9*/</span><br><span class="line">font-size: 5vmin;	/*其他浏览器*/</span><br></pre></td></tr></table></figure>

<h3 id="为什么不建议在mutation和reducers中异步操作"><a href="#为什么不建议在mutation和reducers中异步操作" class="headerlink" title="为什么不建议在mutation和reducers中异步操作"></a>为什么不建议在mutation和reducers中异步操作</h3><p>因为异步操作是成功还是失败不可预测，什么时候进行异步操作也不可预测；当异步操作成功或失败时，如果不 commit(mutation) 或者 dispatch(action)，Vuex 和 Redux 就不能捕获到异步的结果从而进行相应的操作,数据无法正确追踪。并且reducer是纯函数，异步操作，产生副作用，就不是纯函数了</p>
<h3 id="安全对象，安全数组"><a href="#安全对象，安全数组" class="headerlink" title="安全对象，安全数组"></a>安全对象，安全数组</h3><blockquote>
<p>确保使用的东西是一个对象，数组，使用他们的方法时不会报错</p>
</blockquote>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="keyword">const</span> <span class="title function_">safeArray</span> = (<span class="params">array</span>) =&gt; &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="title class_">Array</span>.<span class="title function_">isArray</span>(array) ? array : []</span><br><span class="line">&#125;</span><br><span class="line"></span><br><span class="line"><span class="comment">// 首先要去判断 当前对象是否为有效对象 </span></span><br><span class="line"><span class="keyword">const</span> <span class="title function_">isVaildObject</span> = (<span class="params">obj</span>) =&gt; &#123;</span><br><span class="line">    <span class="keyword">return</span> <span class="keyword">typeof</span> obj === <span class="string">&#x27;object&#x27;</span> &amp;&amp; !<span class="title class_">Array</span>.<span class="title function_">isArray</span>(obj) &amp;&amp; <span class="title class_">Object</span>.<span class="title function_">keys</span>(obj).<span class="property">length</span></span><br><span class="line">&#125;</span><br><span class="line"><span class="comment">// 这里直接用上面的函数 如果有效就返回本身，无效就返回空对象</span></span><br><span class="line"><span class="keyword">const</span> <span class="title function_">safeObject</span> = obj =&gt; <span class="title function_">isVaildObject</span>(obj) ? obj : &#123;&#125;</span><br></pre></td></tr></table></figure>
<h3 id="谷歌控制台"><a href="#谷歌控制台" class="headerlink" title="谷歌控制台"></a>谷歌控制台</h3><ul>
<li>重复发送 &#x3D;&gt; 点击已有接口,右键 <code>replay XHR</code></li>
<li>定位变量，右键复制，或右键添加为全局变量，后面可以在控制台直接使用</li>
<li><code>$_</code>:控制台上一次输出结果,通过 $_对上一次输出结果进行操作</li>
<li><code>$0</code>:快速选择并操作元素  <ul>
<li>点击左上角箭头，选择一个元素，进入控制台输入<code>$0</code>,$0就是目标元素，控制台对元素随意操作</li>
</ul>
</li>
<li>通过方法选择元素、<ul>
<li>$(“h1”)、$$(“h1”) 所有h1</li>
</ul>
</li>
<li>Alt+点击节点 &#x3D;&gt; 展开所以子节的</li>
<li>谷歌工具 控制台( Ctrl+Shift+P )<ul>
<li>screen 截屏</li>
</ul>
</li>
</ul>
<h3 id="未完成计划"><a href="#未完成计划" class="headerlink" title="未完成计划"></a>未完成计划</h3><ul>
<li><p>大屏项目 mockjs</p>
</li>
<li><p>web 加密、安全、摄像头视频流</p>
</li>
<li><p><a target="_blank" rel="noopener" href="http://www.cssmoban.com/cssthemes/6197.shtml">http://www.cssmoban.com/cssthemes/6197.shtml</a></p>
</li>
<li><p><a target="_blank" rel="noopener" href="https://sc.chinaz.com/tag_moban/CSS3.html">https://sc.chinaz.com/tag_moban/CSS3.html</a></p>
</li>
<li><p>SuperScrollorama</p>
</li>
<li><p>使用低版本浏览器通过 vlc 插件播放</p>
<ul>
<li><a target="_blank" rel="noopener" href="http://www.360doc.com/content/17/1103/19/43486_700641264.shtml">http://www.360doc.com/content/17/1103/19/43486_700641264.shtml</a></li>
<li><a target="_blank" rel="noopener" href="https://wiki.videolan.org/Documentation:WebPlugin/">https://wiki.videolan.org/Documentation:WebPlugin/</a></li>
<li>chrome:&#x2F;&#x2F;flags&#x2F;#enable-npap</li>
<li>chrome:&#x2F;&#x2F;plugins 开启 vlc</li>
</ul>
</li>
<li><p>服务端(ffmpeg)将 rtsp 流转 rtmp 或 emu8 等格式，web 可以播放</p>
</li>
<li><p>样式通过 @import “”转移到 App.vue 中</p>
</li>
</ul>
<p>yunbanf:liaozxliao12345<br>内网f:内网f:SFTP - Root账号 , path:home&#x2F;www<br>yunbaniot:liaozxliao123@<br>215:liaozx<br>sv: lzx&#x2F;lzx_12345</p>
<p>local:liaozx&#x2F;liaozx12345</p>
<p>阿里云：223.5.5.5</p>
<p>DNSPod Public DNS：119.29.29.29</p>
<p>Google Public DNS：8.8.8.8&#x2F;8.8.4.4</p>
<p>百度:180.76.76.76</p>
<p><a href="mailto:&#108;&#122;&#111;&#120;&#x75;&#x6e;&#64;&#x67;&#109;&#x61;&#105;&#x6c;&#x2e;&#x63;&#111;&#x6d;">&#108;&#122;&#111;&#120;&#x75;&#x6e;&#64;&#x67;&#109;&#x61;&#105;&#x6c;&#x2e;&#x63;&#111;&#x6d;</a> &#x2F; ablzxyu23zs350001689</p>
<p>huaweibyun 114.115.212.xxx l…16.</p>
<p>Navicat mongo : lzoxun  -&gt;  4233 -&gt; lzx123456.XUN &#x3D;&gt; mongoroot123456</p>
<p>ruanfan z lzoxun m lzx123xxx....@</p>
<p>hwymysql rootlzx123xxx,user-1lzx123xxx</p>
</article><div class="post-copyright"><div class="post-copyright__author"><span class="post-copyright-meta">文章作者: </span><span class="post-copyright-info"><a href="http://example.com">lzoxun</a></span></div><div class="post-copyright__type"><span class="post-copyright-meta">文章链接: </span><span class="post-copyright-info"><a href="http://example.com/2023/07/22/other/other-issues/">http://example.com/2023/07/22/other/other-issues/</a></span></div><div class="post-copyright__notice"><span class="post-copyright-meta">版权声明: </span><span class="post-copyright-info">本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" target="_blank">CC BY-NC-SA 4.0</a> 许可协议。转载请注明来自 <a href="http://example.com" target="_blank">学习笔记</a>！</span></div></div><div class="tag_share"><div class="post-meta__tag-list"></div><div class="post_share"><div class="social-share" data-image="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" data-sites="facebook,twitter,wechat,weibo,qq"></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/css/share.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/sharejs/dist/js/social-share.min.js" defer></script></div></div><nav class="pagination-post" id="pagination"><div class="prev-post pull-left"><a href="/2023/07/22/other/other-vimium/" title="vimium"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">上一篇</div><div class="prev_info">vimium</div></div></a></div><div class="next-post pull-right"><a href="/2023/07/22/other/other-my-use-packs/" title="常用第三方包"><div class="cover" style="background: var(--default-bg-color)"></div><div class="pagination-info"><div class="label">下一篇</div><div class="next_info">常用第三方包</div></div></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="is-center"><div class="avatar-img"><img src= "" data-lazy-src="https://i.loli.net/2021/02/24/5O1day2nriDzjSu.png" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">lzoxun</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">108</div></a><a href="/tags/"><div class="headline">标签</div><div class="length-num">1</div></a><a href="/categories/"><div class="headline">分类</div><div class="length-num">0</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/liaozhongxun"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/liaozhongxun" target="_blank" title="Github"><i class="fab fa-github" style="color: #24292e;"></i></a><a class="social-icon" href="mailto:869664233@gmail.com" target="_blank" title="Email"><i class="fas fa-envelope" style="color: #4a7dbe;"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">这是我的文档</div></div><div class="sticky_layout"><div class="card-widget" id="card-toc"><div class="item-headline"><i class="fas fa-stream"></i><span>目录</span><span class="toc-percentage"></span></div><div class="toc-content"><ol class="toc"><li class="toc-item toc-level-3"><a class="toc-link" href="#vue-v-if"><span class="toc-number">1.</span> <span class="toc-text">vue v-if</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%B8%B8%E8%A7%81%E7%9A%84%E5%85%BC%E5%AE%B9%E6%80%A7%E9%97%AE%E9%A2%98"><span class="toc-number">2.</span> <span class="toc-text">常见的兼容性问题</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%A1%B9%E7%9B%AE%E7%9A%84%E9%9A%BE%E7%82%B9"><span class="toc-number">3.</span> <span class="toc-text">项目的难点</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%BB%88%E7%AB%AF%E5%9B%BE%E6%A0%87%E5%AD%97%E4%BD%93%E6%97%A0%E6%B3%95%E6%98%BE%E7%A4%BA%E9%97%AE%E9%A2%98"><span class="toc-number">4.</span> <span class="toc-text">终端图标字体无法显示问题</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#js-%E6%B5%AE%E7%82%B9%E6%95%B0%E8%AE%A1%E7%AE%97%E5%81%8F%E5%B7%AE%E9%97%AE%E9%A2%98"><span class="toc-number">5.</span> <span class="toc-text">js 浮点数计算偏差问题</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%AF%AD%E6%B3%95%E7%B3%96"><span class="toc-number">6.</span> <span class="toc-text">语法糖</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#github-io-%E6%97%A0%E6%B3%95%E8%AE%BF%E9%97%AE%E7%9A%84%E9%97%AE%E9%A2%98"><span class="toc-number">7.</span> <span class="toc-text">github.io 无法访问的问题</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%B0%86%E7%BD%91%E9%A1%B5%E5%88%9B%E5%BB%BA%E6%A1%8C%E9%9D%A2%E5%BF%AB%E6%8D%B7%E6%96%B9%E5%BC%8F"><span class="toc-number">8.</span> <span class="toc-text">将网页创建桌面快捷方式</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#json"><span class="toc-number">9.</span> <span class="toc-text">json</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E7%A7%BB%E5%8A%A8%E7%AB%AF-click-%E5%BB%B6%E8%BF%9F%E5%A4%84%E7%90%86"><span class="toc-number">10.</span> <span class="toc-text">移动端 click 延迟处理</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E9%81%8D%E5%8E%86%E5%AF%B9%E8%B1%A1"><span class="toc-number">11.</span> <span class="toc-text">遍历对象</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#STAR-%E6%B3%95%E5%88%99"><span class="toc-number">12.</span> <span class="toc-text">STAR 法则</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#robots-txt"><span class="toc-number">13.</span> <span class="toc-text">robots.txt</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#vue-%E5%BF%AB%E6%8D%B7%E5%88%B0%E4%BA%86%E4%BB%A3%E7%A0%81%E6%AE%B5"><span class="toc-number">14.</span> <span class="toc-text">vue 快捷到了代码段</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#hook"><span class="toc-number">15.</span> <span class="toc-text">hook</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%97%A0%E6%B3%95%E5%AE%89%E8%A3%85-node-sass"><span class="toc-number">16.</span> <span class="toc-text">无法安装 node-sass</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#vmin-%E5%92%8C-vm"><span class="toc-number">17.</span> <span class="toc-text">vmin 和 vm</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E4%B8%BA%E4%BB%80%E4%B9%88%E4%B8%8D%E5%BB%BA%E8%AE%AE%E5%9C%A8mutation%E5%92%8Creducers%E4%B8%AD%E5%BC%82%E6%AD%A5%E6%93%8D%E4%BD%9C"><span class="toc-number">18.</span> <span class="toc-text">为什么不建议在mutation和reducers中异步操作</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E5%AE%89%E5%85%A8%E5%AF%B9%E8%B1%A1%EF%BC%8C%E5%AE%89%E5%85%A8%E6%95%B0%E7%BB%84"><span class="toc-number">19.</span> <span class="toc-text">安全对象，安全数组</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E8%B0%B7%E6%AD%8C%E6%8E%A7%E5%88%B6%E5%8F%B0"><span class="toc-number">20.</span> <span class="toc-text">谷歌控制台</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#%E6%9C%AA%E5%AE%8C%E6%88%90%E8%AE%A1%E5%88%92"><span class="toc-number">21.</span> <span class="toc-text">未完成计划</span></a></li></ol></div></div><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-11/" title="win 11 set">win 11 set</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-gitbash/" title="git bash">git bash</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-wsl/" title="wsl">wsl</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/window/win-main/" title="window">window</a><time datetime="2023-07-22T07:14:09.700Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div><div class="aside-list-item no-cover"><div class="content"><a class="title" href="/2023/07/22/web/%E5%85%BC%E5%AE%B9%E9%97%AE%E9%A2%98/" title="兼容问题">兼容问题</a><time datetime="2023-07-22T07:14:09.699Z" title="发表于 2023-07-22 15:14:09">2023-07-22</time></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2023 By lzoxun</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="readmode" type="button" title="阅读模式"><i class="fas fa-book-open"></i></button><button id="translateLink" type="button" title="简繁转换">繁</button><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button class="close" id="mobile-toc-button" type="button" title="目录"><i class="fas fa-list-ul"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i></button></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="/js/tw_cn.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="https://cdn.jsdelivr.net/npm/node-snackbar/dist/snackbar.min.js"></script><script>function panguFn () {
  if (typeof pangu === 'object') pangu.autoSpacingPage()
  else {
    getScript('https://cdn.jsdelivr.net/npm/pangu/dist/browser/pangu.min.js')
      .then(() => {
        pangu.autoSpacingPage()
      })
  }
}

function panguInit () {
  if (false){
    GLOBAL_CONFIG_SITE.isPost && panguFn()
  } else {
    panguFn()
  }
}

document.addEventListener('DOMContentLoaded', panguInit)</script><div class="js-pjax"></div><script id="canvas_nest" defer="defer" color="0,0,255" opacity="0.7" zIndex="-1" count="99" mobile="false" src="https://cdn.jsdelivr.net/npm/butterfly-extsrc/dist/canvas-nest.min.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><div id="local-search"><div class="search-dialog"><nav class="search-nav"><span class="search-dialog-title">搜索</span><span id="loading-status"></span><button class="search-close-button"><i class="fas fa-times"></i></button></nav><div class="is-center" id="loading-database"><i class="fas fa-spinner fa-pulse"></i><span>  数据库加载中</span></div><div class="search-wrap"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div><hr/><div class="no-result" id="local-search-results"></div><div id="local-search-stats-wrap"></div></div></div><div id="search-mask"></div><script src="/js/search/local-search.js"></script></div></div><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","tagMode":false,"log":false,"model":{"jsonPath":"/live2dw/assets/haruto.model.json"},"display":{"position":"right","width":100,"height":200,"right":300},"mobile":{"show":true}});</script></body></html>